<div class="post">
  <div class="title">
    <?php echo CHtml::link(CHtml::encode($torrent->name),'/torrent/show/'.$torrent->id); ?>
  </div>
  <div class="author">
    uploaded by <?php echo isset($torrent->uploader) ? '<a href="/user/details/'.$torrent->uploader->id.'">'.$torrent->uploader->username.'</a>' : '<i>anonymous</i>'; ?>
  </div>
  <br />
  <div class="content">
    <p><?php echo $torrent->description; ?></p><br />
	<p>Info hash: <?php echo Benc::dict_get($dump, 'info_hash', 'string'); ?></p>
	<p>Seeders: <?php echo $torrent->seeders; ?></p>
	<p>Leechers: <?php echo $torrent->leechers; ?></p>
  </div>
  <div class="nav">
    <?php echo CHtml::link('Download',array('/torrent/download/'.$torrent->id)); ?> |
    <?php if(!Yii::app()->user->isGuest && User::model()->findByPk(Yii::app()->user->id)->username == $torrent->uploader->username): ?>
    <?php echo CHtml::link('Delete',array('/torrent/delete/'.$torrent->id)); ?> |
    <?php endif; ?>
    Added on <?php echo $torrent->added; ?>
  </div>
</div><!-- post -->
